from django.http import HttpResponse
from django.shortcuts import render, redirect


def index(request):

    print('请其中。。。')
    return render(request, 'index.html')

def blog(request, id):

    if id == 0:
        return redirect('/ss/error1.html')
    else:
        print('请其中。。。')
        return HttpResponse('id是' + str(id) + "的博客页面")

def blog2(request, year, month, day, id):
    return HttpResponse(str(year) + '/' + str(month) + '/' + str(day) + '/' + 'id是' + str(id) + "的博客页面")



# Create your views here.
